package com.twu.biblioteca;

import java.io.IOException;

/**
 * Created by sahelig on 19/06/14.
 */
public class ListUserInformation implements MenuAction
{


    private Library libraryOnWhichOperationsArePerformed;
    private String stringToBeReturned;
    private boolean successful;
    private String actionPerformed;

    public ListUserInformation(Library lib)
    {

        libraryOnWhichOperationsArePerformed = lib;
        actionPerformed ="to List your information";
    }

    public Result performAction(UserInterface ui, String libraryNumber) throws IOException
    {

        ui.displayUserInformation(new Users().getInfoForCorrespondingLibraryNumber(libraryNumber));
        return new Result(true,"Successfully displayed user information");
    }

    @Override
    public String toString() {
        return actionPerformed;
    }
}
